//
//  ZYHttpConfig.swift
//  ZYHttp
//
//  Created by Yi Zhou on 2025/1/14.
//

import Foundation
import Alamofire

//MARK: -开发环境
public enum ZYHttpEnvironment {
    /// 测试
    case testing(domainName: String)
    /// 灰度
    case grayscale(domainName: String)
    /// 发布
    case release(domainName: String)
}

//MARK: -http配置信息
public class ZYHttpConfig: NSObject {
    
    /// 当前环境
    public var currentEnvironment: ZYHttpEnvironment = .testing(domainName: "") {
        didSet {
            switch currentEnvironment {
            case .testing(let domainName):
                baseUrl = domainName
            case .grayscale(let domainName):
                baseUrl = domainName
            case .release(let domainName):
                baseUrl = domainName
            }
        }
    }
    
    /// 域名
    public var baseUrl: String = ""
    
    /// 常用header
    public var headers: [String: String] = [:]
    
    /// 超时时间
    public var timeOut: Int = 10
    
    /// 是否打印日志
    public var openLog: Bool = true
    
}
